package model;

public class OfferedCourseClosedState implements OfferedCourseState{

	
private OfferedCourse offeredCourse;
	
	public OfferedCourseClosedState(OfferedCourse offeredCourse){
		this.offeredCourse = offeredCourse;
	}
	
	@Override
	public boolean registerStudent(Registration registration) throws Exception {
		throw new Exception("Sorry registration has been closed.");
		
	}

	@Override
	public void unregisterStudent(Registration registration) throws Exception {
		throw new Exception("Sorry registration has been closed.");
		
	}

	@Override
	public void closeRegistration() throws Exception {
		throw new Exception("Sorry registration has already been closed.");
		
	}

	@Override
	public void cancelOfferedCourse() throws Exception {
		throw new Exception("Sorry registration has been closed.");
		
	}
	
	@Override
	public String toString(){
		return model.enums.OfferedCourseState.CLOSED.toString();
	}

}
